package com.titaniume.exer;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

/**
 *@program: JavaSenior
 *@description:
 *@author: renfei.huang
 *@create: 2021-10-11 16:54
 */
public class ListExer {


    //区分List中remove(int index) 和 remove(Object obj)
    @Test
    public void test(){
        List arrayList = new ArrayList();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        updateList(arrayList);
        System.out.println(arrayList);

    }
    public void updateList(List list){
//        list.remove(2);
          list.remove(new Integer(2));
    }
}
